build(release): publish brew cask to remetric-dev/homebrew-tap on each tag#21
Merged
Conversation
…h tag
GoReleaser v2.10 deprecated `brews:` in favour of `homebrew_casks:`, which
matches its prebuilt-binary distribution model better than legacy Formula
recipes. The release workflow now pushes a Cask file to
`remetric-dev/homebrew-tap/Casks/remetric.rb` on every tag.
After-merge user-facing install:
brew install remetric-dev/tap/remetric
README and docs/getting-started point at the new command. The README
"What's still missing" entry that said "No Homebrew tap" is removed.
The release job needs a new repo secret HOMEBREW_TAP_TOKEN: a fine-grained
PAT with `contents: write` on remetric-dev/homebrew-tap. The empty tap
repo also needs to exist before the first tag after this PR. These are
manual steps documented in the PR description.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Wires GoReleaser to publish a Homebrew Cask to a new
remetric-dev/homebrew-taprepo on every tag. After this PR merges and the manual setup below is done, the next release tag auto-populatesCasks/remetric.rband users can:GoReleaser v2.10 deprecated
brews:in favour ofhomebrew_casks:for prebuilt-binary distribution; this PR uses the new section directly rather than pinning an older GoReleaser version.Manual prerequisites (one-time, after merge)
These have to be done by a human with org-admin rights; they can't go in this PR.
Create empty tap repo:
gh repo create remetric-dev/homebrew-tap --public \ --description "Homebrew tap for remetric" --add-readmeCreate a fine-grained PAT at https://github.com/settings/personal-access-tokens with:
remetric-devremetric-dev/homebrew-taponlyContents: Read and writeAdd PAT as repo secret in
remetric-dev/remetric:HOMEBREW_TAP_TOKENTag a release (next
v0.1.0-rc.Norv0.1.0). The release workflow runs goreleaser which pushesCasks/remetric.rbto the tap repo.Verify with
brew install remetric-dev/tap/remetric && remetric --version.Test plan
make release-check(goreleaser v2.10.0) - config validates clean.ciworkflow runs;releasetriggers on tag).git tag v0.1.0-rc.X && git push origin v0.1.0-rc.Xruns release workflow successfully and produces a non-emptyCasks/remetric.rbin the tap repo.brew install remetric-dev/tap/remetricinstalls the binary andremetric --versionprints the expected version.Files
.goreleaser.yml: addhomebrew_casks:section pointing at the tap repo..github/workflows/release.yml: passHOMEBREW_TAP_TOKENsecret into the goreleaser step.README.md: add Homebrew install section; drop "No Homebrew tap" from "What's still missing".docs/getting-started.md: add Homebrew install line.